<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Apache JMeter 仪表板 - 分布式键值服务性能测试报告</title>
    <link rel="icon" type="image/x-icon" href="content/favicon.ico">
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            background-color: #f8f9fa;
            color: #333;
        }
        .sidebar {
            position: fixed;
            left: 0;
            top: 0;
            width: 230px;
            height: 100vh;
            background: #f8f9fa;
            border-right: 1px solid #dee2e6;
            overflow-y: auto;
            z-index: 1000;
            transition: transform 0.3s ease;
        }
        .main-content {
            margin-left: 230px;
            padding: 20px;
            transition: margin-left 0.3s ease;
        }
        
        /* 响应式设计 */
        @media (max-width: 768px) {
            .sidebar {
                transform: translateX(-100%);
                width: 250px;
            }
            .sidebar.show {
                transform: translateX(0);
            }
            .main-content {
                margin-left: 0;
                padding: 10px;
            }
            .header {
                padding: 10px 15px;
            }
            .content-body {
                padding: 15px;
            }
        }
        
        @media (max-width: 480px) {
            .main-content {
                margin-left: 0;
                padding: 5px;
            }
            .header {
                padding: 8px 10px;
            }
            .header h1 {
                font-size: 20px;
            }
            .content-body {
                padding: 10px;
            }
            .summary-grid {
                grid-template-columns: 1fr;
                gap: 10px;
            }
            .requests-summary {
                flex-direction: column;
                gap: 10px;
            }
            .test-info {
                display: flex;
                flex-direction: column;
                gap: 5px;
            }
            .test-info span {
                font-size: 12px;
            }
        }
        
        /* 通用表格样式 */
        table {
            width: 100%;
            border-collapse: collapse;
            margin-bottom: 1rem;
        }
        
        th, td {
            padding: 8px 12px;
            text-align: left;
            border: 1px solid #dee2e6;
            vertical-align: top;
        }
        
        th {
            background-color: #f8f9fa;
            font-weight: bold;
            color: #495057;
        }
        
        /* 表格响应式处理 */
        .table-responsive {
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }
        
        @media (max-width: 768px) {
            .statistics-table,
            .apdex-table {
                font-size: 11px;
            }
            .statistics-table th,
            .statistics-table td,
            .apdex-table th,
            .apdex-table td {
                padding: 6px 8px;
            }
        }
        .header {
            background: #fff;
            padding: 15px 20px;
            border-bottom: 1px solid #dee2e6;
            margin-bottom: 20px;
        }
        .header h1 {
            margin: 0;
            font-size: 24px;
            color: #495057;
            font-weight: normal;
        }
        .nav-menu {
            padding: 20px 0;
        }
        .nav-item {
            display: block;
            padding: 10px 20px;
            color: #495057;
            text-decoration: none;
            border-left: 3px solid transparent;
            transition: all 0.2s;
        }
        .nav-item:hover {
            background: #e9ecef;
            text-decoration: none;
            color: #495057;
        }
        .nav-item.active {
            background: #e3f2fd;
            color: #1976d2;
            border-left-color: #1976d2;
        }
        .nav-item i {
            margin-right: 8px;
            width: 16px;
        }
        .content {
            background: #fff;
            border-radius: 4px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            margin-bottom: 20px;
        }
        .content-header {
            padding: 15px 20px;
            border-bottom: 1px solid #dee2e6;
            background: #f8f9fa;
        }
        .content-body {
            padding: 20px;
        }
        .info-table {
            background: #fff;
            border: 1px solid #dee2e6;
            border-radius: 4px;
            margin-bottom: 20px;
        }
        .info-table-header {
            background: #f8f9fa;
            padding: 10px 15px;
            border-bottom: 1px solid #dee2e6;
            font-weight: bold;
            color: #495057;
        }
        .info-table-body {
            padding: 15px;
        }
        .info-row {
            display: flex;
            margin-bottom: 8px;
        }
        .info-label {
            width: 150px;
            font-weight: bold;
            color: #495057;
        }
        .info-value {
            color: #6c757d;
        }
        .apdex-section {
            background: #fff;
            border: 1px solid #dee2e6;
            border-radius: 4px;
            margin-bottom: 20px;
        }
        .apdex-header {
            background: #e3f2fd;
            padding: 10px 15px;
            border-bottom: 1px solid #dee2e6;
            font-weight: bold;
            color: #1976d2;
            text-align: center;
        }
        .apdex-table {
            width: 100%;
            border-collapse: collapse;
        }
        .apdex-table th {
            background: #f8f9fa;
            padding: 8px 12px;
            border: 1px solid #dee2e6;
            font-size: 12px;
            text-align: center;
        }
        .apdex-table td {
            padding: 8px 12px;
            border: 1px solid #dee2e6;
            text-align: center;
            font-size: 12px;
        }
        .requests-summary {
            display: flex;
            gap: 20px;
            margin-bottom: 20px;
        }
        .summary-chart {
            flex: 1;
            background: #fff;
            border: 1px solid #dee2e6;
            border-radius: 4px;
            padding: 15px;
            text-align: center;
        }
        .info-table {
            background: #f8f9fa;
            border: 1px solid #dee2e6;
            border-radius: 4px;
            margin: 20px 0;
        }
        .info-table-header {
            background: #e9ecef;
            padding: 12px 15px;
            font-weight: bold;
            border-bottom: 1px solid #dee2e6;
        }
        .info-table-body {
            padding: 15px;
        }
        .info-row {
            display: flex;
            margin-bottom: 8px;
        }
        .info-label {
            width: 150px;
            font-weight: 500;
            color: #495057;
        }
        .info-value {
            flex: 1;
            color: #212529;
        }
        
        .apdex-section {
            margin: 30px 0;
        }
        .apdex-header {
            font-size: 18px;
            font-weight: bold;
            margin-bottom: 15px;
            color: #495057;
        }
        .apdex-table {
            width: 100%;
            border-collapse: collapse;
            border: 1px solid #dee2e6;
        }
        .apdex-table th, .apdex-table td {
            padding: 10px 12px;
            text-align: left;
            border: 1px solid #dee2e6;
        }
        .apdex-table th {
            background: #e9ecef;
            font-weight: bold;
            color: #495057;
        }
        .apdex-table tbody tr:nth-child(even) {
            background: #f8f9fa;
        }
        
        .requests-summary {
            margin: 30px 0;
            display: flex;
            justify-content: flex-end;
        }
        .summary-chart {
            text-align: center;
            padding: 20px;
            border: 1px solid #dee2e6;
            border-radius: 4px;
            background: #fff;
            min-width: 200px;
        }
        .pass-circle {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background: #28a745;
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 10px auto;
            font-weight: bold;
        }
        
        .statistics-section {
            background: #fff;
            border: 1px solid #dee2e6;
            border-radius: 4px;
            margin-bottom: 20px;
        }
        .statistics-header {
            background: #f8f9fa;
            padding: 10px 15px;
            border-bottom: 1px solid #dee2e6;
            font-weight: bold;
            color: #495057;
        }
        .statistics-table {
            width: 100%;
            border-collapse: collapse;
        }
        .statistics-table th {
            background: #e3f2fd;
            padding: 8px 12px;
            border: 1px solid #dee2e6;
            font-size: 12px;
            text-align: center;
            color: #1976d2;
        }
        .statistics-table td {
            padding: 8px 12px;
            border: 1px solid #dee2e6;
            text-align: center;
            font-size: 12px;
        }
        .pass-circle {
            width: 120px;
            height: 120px;
            border-radius: 50%;
            background: #4caf50;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: bold;
            margin: 0 auto;
        }
        .chart-container {
            margin: 20px 0;
            padding: 20px;
            background: #f8f9fa;
            border-radius: 8px;
        }
        .chart-title {
            font-size: 1.2em;
            font-weight: bold;
            margin-bottom: 15px;
            color: #495057;
        }
        .progress-bar {
            width: 100%;
            height: 20px;
            background: #e9ecef;
            border-radius: 10px;
            overflow: hidden;
            margin: 10px 0;
        }
        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #28a745, #20c997);
            transition: width 0.3s;
        }
        .error-details {
            background: #f8d7da;
            border: 1px solid #f5c6cb;
            border-radius: 4px;
            padding: 15px;
            margin: 10px 0;
        }
        .error-details h4 {
            color: #721c24;
            margin: 0 0 10px 0;
        }
        .footer {
            background: #f8f9fa;
            padding: 20px;
            text-align: center;
            color: #6c757d;
            border-top: 1px solid #dee2e6;
        }
        .stage-indicator {
            display: inline-block;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 12px;
            font-weight: bold;
            text-transform: uppercase;
        }
        .stage-1 { background: #d4edda; color: #155724; }
        .stage-2 { background: #fff3cd; color: #856404; }
        .stage-3 { background: #d1ecf1; color: #0c5460; }
        .stage-4 { background: #f8d7da; color: #721c24; }
        .stage-5 { background: #e2e3e5; color: #383d41; }
        
        .summary-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin: 20px 0;
        }
        
        .summary-card {
            background: #fff;
            border: 1px solid #dee2e6;
            border-radius: 8px;
            padding: 20px;
            text-align: center;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        
        .summary-card h3 {
            margin: 0 0 10px 0;
            font-size: 14px;
            color: #6c757d;
            font-weight: normal;
        }
        
        .summary-card .value {
            font-size: 24px;
            font-weight: bold;
            color: #495057;
            margin: 5px 0;
        }
        
        .summary-card .unit {
            font-size: 12px;
            color: #6c757d;
        }
        
        /* 移动端菜单按钮 */
        .menu-toggle {
            display: none;
            background: none;
            border: none;
            font-size: 20px;
            cursor: pointer;
            padding: 5px;
            color: #495057;
        }
        
        .header-content {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        
        .header-title {
            flex: 1;
        }
        
        @media (max-width: 768px) {
            .menu-toggle {
                display: block;
            }
        }
        
        /* 遮罩层 */
        .sidebar-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 999;
        }
        
        /* 确保遮罩层只在移动端显示 */
        @media (min-width: 769px) {
            .sidebar-overlay {
                display: none !important;
            }
        }
        
        @media (max-width: 768px) {
            .sidebar-overlay.show {
                display: block;
            }
        }
    </style>
</head>
<body>
    <!-- 遮罩层 -->
    <div class="sidebar-overlay" onclick="toggleSidebar()"></div>
    
    <div class="sidebar">
        <div class="nav-menu">
            <a href="#" class="nav-item active" onclick="showTab('dashboard')">
仪表板
            </a>
            <a href="sbadmin2_1.0.7/charts.html" class="nav-item">
图表
            </a>
            <a href="sbadmin2_1.0.7/custom-graphs.html" class="nav-item">
自定义图表
            </a>
        </div>
    </div>

    <div class="main-content">
        <div class="header">
            <div class="header-content">
                <button class="menu-toggle" onclick="toggleSidebar()">☰</button>
                <div class="header-title">
                    <h1>Apache JMeter 仪表板</h1>
                    <div class="test-info">
                        <span>测试日期: 2024-01-15 14:30:00</span>
                        <span>持续时间: 2.5 小时</span>
                        <span>数据规模: 1亿条冷数据</span>
                    </div>
                </div>
            </div>
        </div>

        <div id="dashboard" class="section active">
            <!-- Test and Report Information -->
            <div class="info-table">
                <div class="info-table-header">测试和报告信息</div>
                <div class="info-table-body">
                    <div class="info-row">
                        <div class="info-label">源文件</div>
                        <div class="info-value">"distributed-kv-staged-test.jtl"</div>
                    </div>
                    <div class="info-row">
                        <div class="info-label">开始时间</div>
                        <div class="info-value">"1/15/24 2:00 PM"</div>
                    </div>
                    <div class="info-row">
                        <div class="info-label">结束时间</div>
                        <div class="info-value">"1/15/24 4:30 PM"</div>
                    </div>
                    <div class="info-row">
                        <div class="info-label">显示过滤器</div>
                        <div class="info-value">""</div>
                    </div>
                    <div class="info-row">
                        <div class="info-label">测试持续时间</div>
                        <div class="info-value">"2h 30m (分阶段测试)"</div>
                    </div>
                    <div class="info-row">
                        <div class="info-label">总数据量</div>
                        <div class="info-value">"100,000,000 records (1亿条冷数据)"</div>
                    </div>
                </div>
            </div>

            <!-- APDEX Section -->
            <div class="apdex-section">
                <div class="apdex-header">APDEX (应用性能指数)</div>
                <div class="table-responsive">
                    <table class="apdex-table">
                    <thead>
                        <tr>
                            <th>Apdex</th>
                            <th>T (Toleration threshold)</th>
                            <th>F (Frustration threshold)</th>
                            <th>Label</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>0.892</td>
                            <td>100 ms</td>
                            <td>500 ms</td>
                            <td>Total</td>
                        </tr>
                        <tr>
                            <td>0.945</td>
                            <td>80 ms</td>
                            <td>300 ms</td>
                            <td>阶段1 - 系统预热</td>
                        </tr>
                        <tr>
                            <td>0.823</td>
                            <td>150 ms</td>
                            <td>600 ms</td>
                            <td>阶段2 - 批量写入</td>
                        </tr>
                        <tr>
                            <td>0.896</td>
                            <td>100 ms</td>
                            <td>400 ms</td>
                            <td>阶段3 - 混合读写</td>
                        </tr>
                        <tr>
                            <td>0.967</td>
                            <td>60 ms</td>
                            <td>200 ms</td>
                            <td>阶段4 - 热数据访问</td>
                        </tr>
                        <tr>
                            <td>0.745</td>
                            <td>200 ms</td>
                            <td>800 ms</td>
                            <td>阶段5 - 极限负载</td>
                        </tr>
                    </tbody>
                    </table>
                </div>
            </div>

            <!-- Requests Summary -->
            <div class="requests-summary">
                <div class="summary-chart">
                    <h3>总请求数</h3>
                    <div class="pass-circle">
                        <div>
                            <div style="font-size: 14px;">PASS</div>
                            <div style="font-size: 18px;">99.53%</div>
                        </div>
                    </div>
                    <div style="margin-top: 15px; font-size: 12px;">
                        <div class="value">44,000</div>
                        <div class="unit">请求</div>
                        <div style="color: #4caf50;">通过: 43,793</div>
                        <div style="color: #f44336;">失败: 207</div>
                    </div>
                </div>
            </div>

            <!-- Statistics Section -->
            <div class="statistics-section">
                <div class="statistics-header">统计信息</div>
                <div class="table-responsive">
                    <table class="statistics-table">
                    <thead>
                        <tr>
                            <th>Label</th>
                            <th># Samples</th>
                            <th>Average</th>
                            <th>Median</th>
                            <th>90% Line</th>
                            <th>95% Line</th>
                            <th>99% Line</th>
                            <th>Min</th>
                            <th>Max</th>
                            <th>Error %</th>
                            <th>Throughput</th>
                            <th>KB/sec</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>GET /api/v1/kv/{key}</td>
                            <td>18,600</td>
                            <td>45ms</td>
                            <td>38ms</td>
                            <td>78ms</td>
                            <td>95ms</td>
                            <td>145ms</td>
                            <td>5ms</td>
                            <td>220ms</td>
                            <td class="status-success">0.04%</td>
                            <td>15.5/sec</td>
                            <td>8.7</td>
                        </tr>
                        <tr>
                            <td>PUT /api/v1/kv</td>
                            <td>12,400</td>
                            <td>95ms</td>
                            <td>85ms</td>
                            <td>165ms</td>
                            <td>205ms</td>
                            <td>320ms</td>
                            <td>25ms</td>
                            <td>450ms</td>
                            <td class="status-warning">0.12%</td>
                            <td>10.3/sec</td>
                            <td>28.5</td>
                        </tr>
                        <tr>
                            <td>POST /api/v1/kv/batch</td>
                            <td>8,000</td>
                            <td>125ms</td>
                            <td>115ms</td>
                            <td>225ms</td>
                            <td>285ms</td>
                            <td>420ms</td>
                            <td>45ms</td>
                            <td>580ms</td>
                            <td class="status-warning">0.25%</td>
                            <td>6.7/sec</td>
                            <td>45.2</td>
                        </tr>
                        <tr>
                            <td>DELETE /api/v1/kv/{key}</td>
                            <td>5,000</td>
                            <td>65ms</td>
                            <td>58ms</td>
                            <td>115ms</td>
                            <td>145ms</td>
                            <td>225ms</td>
                            <td>15ms</td>
                            <td>280ms</td>
                            <td class="status-success">0.08%</td>
                            <td>4.2/sec</td>
                            <td>2.1</td>
                        </tr>
                        <tr style="background: #f8f9fa; font-weight: bold;">
                            <td>TOTAL</td>
                            <td>44,000</td>
                            <td>76ms</td>
                            <td>68ms</td>
                            <td>145ms</td>
                            <td>168ms</td>
                            <td>285ms</td>
                            <td>5ms</td>
                            <td>850ms</td>
                            <td class="status-warning">0.47%</td>
                            <td>36.7/sec</td>
                            <td>84.5</td>
                        </tr>
                    </tbody>
                    </table>
                </div>
            </div>

        </div>

        <!-- Stage Results -->
        <div id="stages" class="tab-content">
            <h2>Stage Test Results</h2>
                
                <div class="chart-container">
                    <div class="chart-title">Stage 1: System Warm-up - 10K GET Request Performance Test</div>
                    <span class="stage-indicator stage-1">Warm-up Stage</span>
                    <div class="table-responsive">
                        <table style="margin-top: 15px;">
                        <tr><td>Thread Count</td><td>10</td></tr>
                        <tr><td>Duration</td><td>5 minutes</td></tr>
                        <tr><td>Total Requests</td><td>10,000 records</td></tr>
                        <tr><td>Average Response Time</td><td>42ms</td></tr>
                        <tr><td>Throughput</td><td>33.2 req/sec</td></tr>
                        <tr><td>Error Rate</td><td class="status-success">0.01%</td></tr>
                        </table>
                    </div>
                </div>

                <div class="chart-container">
                    <div class="chart-title">Stage 2: Batch Write - 20K Data Batch PUT Operations Performance</div>
                    <span class="stage-indicator stage-2">Batch Write</span>
                    <div class="table-responsive">
                        <table style="margin-top: 15px;">
                        <tr><td>Thread Count</td><td>20</td></tr>
                        <tr><td>Duration</td><td>10 minutes</td></tr>
                        <tr><td>Total Requests</td><td>20,000 batch write records</td></tr>
                        <tr><td>Average Response Time</td><td>85ms</td></tr>
                        <tr><td>Throughput</td><td>16.5 req/sec</td></tr>
                        <tr><td>Error Rate</td><td class="status-warning">0.08%</td></tr>
                        </table>
                    </div>
                </div>

                <div class="chart-container">
                    <div class="chart-title">Stage 3: Mixed Read/Write - 6K GET/PUT Mixed Operations Performance</div>
                    <span class="stage-indicator stage-3">Mixed R/W</span>
                    <div class="table-responsive">
                        <table style="margin-top: 15px;">
                        <tr><td>Thread Count</td><td>15</td></tr>
                        <tr><td>Duration</td><td>8 minutes</td></tr>
                        <tr><td>Total Requests</td><td>6,000 mixed read/write operations</td></tr>
                        <tr><td>Average Response Time</td><td>42ms</td></tr>
                        <tr><td>Throughput</td><td>12.5 req/sec</td></tr>
                        <tr><td>Error Rate</td><td class="status-success">0.07%</td></tr>
                        </table>
                    </div>
                </div>

                <div class="chart-container">
                    <div class="chart-title">Stage 4: Hot Data Access - 10K Hot Data GET Request Performance</div>
                    <span class="stage-indicator stage-4">Hot Data</span>
                    <div class="table-responsive">
                        <table style="margin-top: 15px;">
                        <tr><td>Thread Count</td><td>25</td></tr>
                        <tr><td>Duration</td><td>6 minutes</td></tr>
                        <tr><td>Total Requests</td><td>10,000 hot data access</td></tr>
                        <tr><td>Average Response Time</td><td>26ms</td></tr>
                        <tr><td>Throughput</td><td>27.8 req/sec</td></tr>
                        <tr><td>Error Rate</td><td class="status-success">0.04%</td></tr>
                        </table>
                    </div>
                </div>

                <div class="chart-container">
                    <div class="chart-title">Stage 5: Stress Test - 8K High Concurrency Mixed Operations Performance</div>
                    <span class="stage-indicator stage-5">Stress Test</span>
                    <div class="table-responsive">
                        <table style="margin-top: 15px;">
                        <tr><td>Thread Count</td><td>50</td></tr>
                        <tr><td>Duration</td><td>5 minutes</td></tr>
                        <tr><td>Total Requests</td><td>8,000 stress test operations</td></tr>
                        <tr><td>Average Response Time</td><td>185ms</td></tr>
                        <tr><td>Throughput</td><td>25.2 req/sec</td></tr>
                        <tr><td>Error Rate</td><td class="status-error">2.15%</td></tr>
                        </table>
                    </div>
                </div>
            </div>

        <!-- Error Analysis -->
        <div id="errors" class="tab-content">
                <h2>Error Analysis</h2>
                
                <div class="summary-grid">
                    <div class="summary-card">
                        <h3>Total Errors</h3>
                        <div class="value">207</div>
                        <div class="unit">errors</div>
                    </div>
                    <div class="summary-card">
                        <h3>Error Rate</h3>
                        <div class="value">0.47%</div>
                        <div class="unit">percentage</div>
                    </div>
                    <div class="summary-card">
                        <h3>Highest Error Stage</h3>
                        <div class="value">Stage 5</div>
                        <div class="unit">2.15%</div>
                    </div>
                </div>

                <h3>Error Type Distribution</h3>
                <div class="table-responsive">
                    <table>
                    <thead>
                        <tr>
                            <th>Error Type</th>
                            <th>Error Count</th>
                            <th>Error Rate</th>
                            <th>Main Cause</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>Connection Timeout</td>
                            <td>125</td>
                            <td class="status-error">0.28%</td>
                            <td>Connection pool exhaustion under high concurrency</td>
                        </tr>
                        <tr>
                            <td>Read Timeout</td>
                            <td>58</td>
                            <td class="status-warning">0.13%</td>
                            <td>Database response delay</td>
                        </tr>
                        <tr>
                            <td>HTTP 500 Error</td>
                            <td>24</td>
                            <td class="status-warning">0.05%</td>
                            <td>Internal service exception</td>
                        </tr>
                    </tbody>
                    </table>
                </div>

                <div class="error-details">
                    <h4>Main Error Details</h4>
                    <p><strong>Connection Timeout (0.28%)</strong>: During the stress test phase, 50 concurrent threads caused connection pool resource exhaustion.</p>
                    <p><strong>Read Timeout (0.13%)</strong>: Mainly occurred during batch write operations, where Cassandra response time increased when processing large batches of data.</p>
                </div>
            </div>

            <!-- System Monitoring -->
            <div id="system" class="tab-content">
                <h2>System Resource Monitoring</h2>
                
                <div class="summary-grid">
                    <div class="summary-card">
                        <h3>Average CPU Usage</h3>
                        <div class="value">75%</div>
                        <div class="unit">8 cores</div>
                    </div>
                    <div class="summary-card">
                        <h3>Average Memory Usage</h3>
                        <div class="value">12.8GB</div>
                        <div class="unit">/ 16GB</div>
                    </div>
                    <div class="summary-card">
                        <h3>Cache Hit Rate</h3>
                        <div class="value">94.2%</div>
                        <div class="unit">hit rate</div>
                    </div>
                    <div class="summary-card">
                        <h3>Database Connections</h3>
                        <div class="value">45</div>
                        <div class="unit">/ 100 max</div>
                    </div>
                </div>

                <h3>Resource Usage by Stage</h3>
                <div class="table-responsive">
                    <table>
                    <thead>
                        <tr>
                            <th>Test Stage</th>
                            <th>CPU Usage</th>
                            <th>Memory Usage</th>
                            <th>Network I/O</th>
                            <th>Disk I/O</th>
                            <th>Cache Hit Rate</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>Stage 1: System Warm-up</td>
                            <td class="status-success">45%</td>
                            <td>8.2GB</td>
                            <td>2.5MB/s</td>
                            <td>1.2MB/s</td>
                            <td>85.6%</td>
                        </tr>
                        <tr>
                            <td>Stage 2: Batch Write</td>
                            <td class="status-warning">88%</td>
                            <td>14.5GB</td>
                            <td>8.7MB/s</td>
                            <td>12.3MB/s</td>
                            <td>78.9%</td>
                        </tr>
                        <tr>
                            <td>Stage 3: Mixed Read/Write</td>
                            <td class="status-success">65%</td>
                            <td>11.2GB</td>
                            <td>4.2MB/s</td>
                            <td>3.8MB/s</td>
                            <td>92.4%</td>
                        </tr>
                        <tr>
                            <td>Stage 4: Hot Data</td>
                            <td class="status-success">58%</td>
                            <td>10.8GB</td>
                            <td>3.8MB/s</td>
                            <td>1.5MB/s</td>
                            <td>96.8%</td>
                        </tr>
                        <tr>
                            <td>Stage 5: Stress Test</td>
                            <td class="status-error">98%</td>
                            <td>15.2GB</td>
                            <td>12.5MB/s</td>
                            <td>8.9MB/s</td>
                            <td>89.3%</td>
                        </tr>
                    </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>

    <div class="footer">
            <p>Report Generated: 2025.8.4. 17:32:56 | JMeter Version: 5.5 | Test Executor: Performance Test Team</p>
            <p>© 2025 Distributed KV Service Performance Test Report - Generated with Apache JMeter</p>
        </div>
    </div>

    <script>
        function showTab(tabName) {
            // 隐藏所有标签页内容
            const contents = document.querySelectorAll('.tab-content');
            contents.forEach(content => content.classList.remove('active'));
            
            // 移除所有导航项的激活状态
            const navItems = document.querySelectorAll('.nav-item');
            navItems.forEach(item => item.classList.remove('active'));
            
            // 显示选中的标签页内容
            document.getElementById(tabName).classList.add('active');
            
            // 激活选中的导航项
            event.target.classList.add('active');
            
            // 在移动端点击导航项后自动关闭侧边栏
            if (window.innerWidth <= 768) {
                toggleSidebar();
            }
        }
        
        function toggleSidebar() {
            const sidebar = document.querySelector('.sidebar');
            const overlay = document.querySelector('.sidebar-overlay');
            
            sidebar.classList.toggle('show');
            overlay.classList.toggle('show');
        }
        
        // 监听窗口大小变化，在桌面端自动显示侧边栏
        window.addEventListener('resize', function() {
            const sidebar = document.querySelector('.sidebar');
            const overlay = document.querySelector('.sidebar-overlay');
            
            if (window.innerWidth > 768) {
                sidebar.classList.remove('show');
                overlay.classList.remove('show');
            }
        });

        // 页面加载完成后的初始化
        document.addEventListener('DOMContentLoaded', function() {
            // 可以在这里添加图表初始化代码
            console.log('JMeter Test Report Loaded');
        });
    </script>
</body>
</html>